﻿@model Easy.CMS.List.ViewModel.ListDetailViewModel


<div class="article-detail" style="background:#fff;">
    @if (!Model.JsonResult.IsNullOrEmpty())
    {
        var items = Json.Decode(Model.JsonResult);
        if (items != null && items.Length > 0)
        {
            var item = items[0];
            <div class="page-header">
                <h2 class="align-center" style="padding-right:20px;padding-left:20px;">
                    @if (!Model.Widget.Head.IsNullOrEmpty())
                    {
                        @item[Model.Widget.Head]
                    }
                </h2>
                <div class="align-right" style="padding-right:30px;">
                    <span>
                        <i class="glyphicon glyphicon-user"></i>
                        @if (!Model.Field_CreateBy.IsNullOrEmpty())
                        {
                            @item[Model.Field_CreateBy]
                        }
                    </span>
                    <span>
                        <i class="glyphicon glyphicon-calendar"></i>
                            @if (!Model.Field_UpdateDate.IsNullOrEmpty())
                            {
                                @((item[Model.Field_UpdateDate] != null ? Convert.ToDateTime(item[Model.Field_UpdateDate]) : DateTime.Now).ToString("yyyy-MM-dd"))
                            }   
                    </span>
                </div>
            </div>
            <div class="panel-body detail clearfix">
                    @*@if (Model.Current.ImageUrl.IsNotNullAndWhiteSpace())
                    {
                         <img class="thumbnail" src="@Url.Content(Model.Current.ImageUrl)" alt="@Model.Current.Title" />
                    }*@
                    @if (!Model.Widget.Content.IsNullOrEmpty())
                    {
                        @Html.Raw(item[Model.Widget.Content])
                    }
            </div>
        }
    }
</div>